button {
    display: block; 
    width: 15%; 
    padding: 5px 10px; 
    margin-left: 10px;
    margin-bottom: 10px;
    background: #4caf50; 
    color: white;
    border: none; 
    border-radius: 5px; 
    font-size: 16px; 
    cursor: pointer; 
    transition: all 0.3s; 
}

button:hover {
    background: #45a049;
}
.ui-checkbox {
    --primary-color: #F36C14;
    --secondary-color: #fff;
    --primary-hover-color: orange;
    /* checkbox */
    --checkbox-diameter: 20px;
    --checkbox-border-radius: 5px;
    --checkbox-border-color: #d9d9d9;
    --checkbox-border-width: 1px;
    --checkbox-border-style: solid;
    /* checkmark */
    --checkmark-size: 1.2;
}

.ui-checkbox,
.ui-checkbox *,
.ui-checkbox *::before,
.ui-checkbox *::after {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

.ui-checkbox {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: var(--checkbox-diameter);
    height: var(--checkbox-diameter);
    border-radius: var(--checkbox-border-radius);
    background: var(--secondary-color);
    border: var(--checkbox-border-width) var(--checkbox-border-style) var(--checkbox-border-color);
    -webkit-transition: all 0.3s;
    -o-transition: all 0.3s;
    transition: all 0.3s;
    cursor: pointer;
    position: absolute; /* 绝对定位 */
    top: 10px; /* 距离顶部10px */
    right: 10px; /* 距离右侧10px */
    z-index: 1; /* z-index */
}

.ui-checkbox::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    -webkit-box-shadow: 0 0 0 calc(var(--checkbox-diameter) / 2.5) var(--primary-color);
    box-shadow: 0 0 0 calc(var(--checkbox-diameter) / 2.5) var(--primary-color);
    border-radius: inherit;
    opacity: 0;
    -webkit-transition: all 0.5s cubic-bezier(0.12, 0.4, 0.29, 1.46);
    -o-transition: all 0.5s cubic-bezier(0.12, 0.4, 0.29, 1.46);
    transition: all 0.5s cubic-bezier(0.12, 0.4, 0.29, 1.46);
}

.ui-checkbox::before {
    top: 40%;
    left: 50%;
    content: "";
    position: absolute;
    width: 4px;
    height: 7px;
    border-right: 2px solid var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
    -webkit-transform: translate(-50%, -50%) rotate(45deg) scale(0);
    -ms-transform: translate(-50%, -50%) rotate(45deg) scale(0);
    transform: translate(-50%, -50%) rotate(45deg) scale(0);
    opacity: 0;
    -webkit-transition: all 0.1s cubic-bezier(0.71, -0.46, 0.88, 0.6), opacity 0.1s;
    -o-transition: all 0.1s cubic-bezier(0.71, -0.46, 0.88, 0.6), opacity 0.1s;
    transition: all 0.1s cubic-bezier(0.71, -0.46, 0.88, 0.6), opacity 0.1s;
}

/* actions */

.ui-checkbox:hover {
    border-color: var(--primary-color);
}

.ui-checkbox:checked {
    background: var(--primary-color);
    border-color: transparent;
}

.ui-checkbox:checked::before {
    opacity: 1;
    -webkit-transform: translate(-50%, -50%) rotate(45deg) scale(var(--checkmark-size));
    -ms-transform: translate(-50%, -50%) rotate(45deg) scale(var(--checkmark-size));
    transform: translate(-50%, -50%) rotate(45deg) scale(var(--checkmark-size));
    -webkit-transition: all 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46) 0.1s;
    -o-transition: all 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46) 0.1s;
    transition: all 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46) 0.1s;
}

.ui-checkbox:active:not(:checked)::after {
    -webkit-transition: none;
    -o-transition: none;
    -webkit-box-shadow: none;
    box-shadow: none;
    transition: none;
    opacity: 1;
}
/* 课程卡片样式 */
.course-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 10px;
}

.course-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.course-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.course-card:hover img {
    transform: scale(1.05);
}

.course-info {
    padding: 20px;
}

.course-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #2c3e50;
    line-height: 1.4;
}

.course-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    display: -webkit-box;
    /* -webkit-line-clamp: 2; */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.course-stats span {
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
}

.course-stats span i {
    margin-right: 5px;
    font-size: 16px;
}
/*头像*/
.sidebar-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* margin-bottom: 2rem; */
    padding: 1rem;          /* 改为统一内边距 */
    border-bottom: 1px dashed #ccc;
    width: 100%;            /* 宽度撑满父容器 */
    box-sizing: border-box; /* 包括padding在内宽度 */
}

.sidebar-profile img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.8rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sidebar-profile p {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    text-align: center;
    width: 100%;            /* 用户名文字占满全宽，方便居中 */
    margin: 0;              /* 取消默认上下margin */
}
/* ==== 账号管理表格 ==== */
.account-table{
  width:100%;
  border-collapse:collapse;
  margin-top:18px;
  font-size:14px;
}
.account-table th,
.account-table td{
  border:1px solid #e0e0e0;
  padding:10px 12px;
  text-align:center;
}
.account-table thead{
  background:#f5f7fa;
  font-weight:600;
}
.account-table img{
  width:42px;
  height:42px;
  border-radius:50%;
  object-fit:cover;
}
.badge-teacher{color:#d97706;font-weight:600;}
.badge-student{color:#2563eb;font-weight:600;}

.freeze-btn{
  padding:6px 12px;
  border:none;
  border-radius:6px;
  cursor:pointer;
  font-size:13px;
  color:#fff;
  transition:all .2s;
}
.freeze-btn.freeze{background:#e53e3e;}
.freeze-btn.unfreeze{background:#16a34a;}
.freeze-btn:hover{opacity:.85;}
/*账号管理*/
#accounts-table {
   margin: 20px 60px;            /* 这里设置外边距 */
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-family: "Segoe UI", sans-serif;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-radius: 8px;
  overflow: hidden;
}

#accounts-table th,
#accounts-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #ddd;
  
  text-align: center;
}
#accounts-table td {
  text-align: center; /* 所有 td 居中 */
  vertical-align: middle; /* 垂直居中，可选 */
}

#accounts-table td button {
  display: inline-block; /* 保证按钮居中 */
  margin: 0 auto;
}


#accounts-table th {
  background-color: #f5f7fa;
  color: #333;
  font-weight: 600;
  
}

#accounts-table tbody tr:hover {
  background-color: #f0f0f0;
}

#accounts-table img {
  border-radius: 50%;
}

.freeze-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.freeze-btn.freeze {
  background-color: #ff4d4f;
  color: white;
}

.freeze-btn.unfreeze {
  background-color: #52c41a;
  color: white;
}
.freeze-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  transition: background-color 0.3s;
  cursor: pointer;
}
.sidebar-item.active{
    background: #6195FF;
    color: #fff;
    font-weight: 600;
}